import request from "@/request/index.js";

const auth = "auth"; //http://101.42.107.47:30019文档
const base = "base"; //http://101.42.107.47:30020文档
const zhpt = "zhpt"; //http://101.42.107.47:30018文档

//获取专利列表
export const patentListApi = (params) => {
    return request({
        url: `/api/${zhpt}/patent/dynamic/find`,
        method: "get",
        params,
    });
};

//查询单个专利
export const searchPatentApi = (params) => {
    return request({
        url: `/api/${zhpt}/patent/searchByNum`,
        method: "get",
        params,
    });
};

//新增专利
export const addPatentApi = (data) => {
    return request({
        url: `/api/${zhpt}/patent/dynamic/add`,
        method: "post",
        data,
    });
};

//专利批量操作
export const patentBatchApi = (data) => {
    return request({
        url: `/api/${zhpt}/patent/dynamic/batch`,
        method: "post",
        data,
    });
};

//专利详情
export const patentDetailApi = (params) => {
    return request({
        url: `/api/${zhpt}/patent/dynamic/info`,
        method: "get",
        params,
    });
};

//编辑专利
export const editPatentApi = (data) => {
    return request({
        url: `/api/${zhpt}/patent/dynamic/edit`,
        method: "post",
        data,
    });
};

//专利详情完整版
export const allPatentDetailApi = (params) => {
    return request({
        url: `/api/${zhpt}/patent/info`,
        method: "post",
        params,
    });
};